import javax.sound.midi.MidiChannel;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Synthesizer;

//http://stackoverflow.com/questions/7147294/how-to-generate-pure-tones-with-different-decibels-in-java
public class Musique {
    Synthesizer synthesizer;
    MidiChannel channel;
    
    public Musique() {
		try {
		    synthesizer = MidiSystem.getSynthesizer();
		    channel = synthesizer.getChannels()[0];
		    synthesizer.open();
		} catch (MidiUnavailableException e) {
			e.printStackTrace();
		}
    }
    
	public void playNote(int note){
		channel.noteOn(note, 50);
	}
}
